/**
 * 通用基础接口，包含三个数据共有的字段
 */
interface LayerInfoInterface {
  id: string;
  name: string;
  address: string;
  type: string;
  typecode: string;
  tel: string | null;
  lng: number;
  lat: number;
  lng_wgs_1984: number;
  lat_wgs_1984: number;
  district: string;
  street: string;
  community: string;
  urban_village: string;
  residential_complex: string;
  building: string;
  regionType: string;
  regionName: string;
}

/**
 * 问题类型数据
 * 独属字段：issueType、solution_satisfaction、issueTitle、issueDescription
 */
export type IssueInfoType = LayerInfoInterface & {
  issueType: string;
  solution_satisfaction: number;
  issueTitle: string;
  issueDescription: string;
};

/**
 * 项目类型数据
 * 独属字段：projectType、satisfaction
 */
export type ProjectInfoType = LayerInfoInterface & {
  projectType: string;
  satisfaction: number;
};

/**
 * 整改类型数据
 * 独属字段：rectification_result、rectification_score、rectification_status、evaluationTitle、evaluationContent、evaluationScore、evaluator
 */
export type RectificationInfoType = LayerInfoInterface & {
  rectification_result: string;
  rectification_score: number;
  rectification_status: string;
  evaluationTitle: string;
  evaluationContent: string;
  evaluationScore: number;
  evaluator: string;
};

export type LayerInfoType =
  | IssueInfoType
  | ProjectInfoType
  | RectificationInfoType;
